<include file="public@header"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/js/tablesort/css/dataTables.bootstrap.css">
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">测试列表</a></li>
        <li><a href="{:url('Test/add')}">添加测试</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="get" action="{:url('Test/index')}">
        <!--时间:-->
        <!--<input type="text" class="form-control js-bootstrap-datetime" name="start_time"-->
               <!--value="{$start_time|default=''}"-->
               <!--style="width: 140px;" autocomplete="off">- -->
        <!--<input type="text" class="form-control js-bootstrap-datetime" name="end_time"-->
               <!--value="{$end_time|default=''}"-->
               <!--style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;-->
        <!--关键字:-->
        <input type="text" class="form-control" name="name" style="width: 200px;"
               value="{:input('request.name','')}" placeholder="请输入名称">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('Test/index')}">清空</a>
    </form>
    <form class="js-ajax-form" action="" method="post">
        <table class="table table-hover table-bordered table-list" id="example">
            <thead>
            <tr>
                <th>ID</th>
                <th style="pointer-events: none;">名称</th>
                <th>缩略图</th>
                <th>简介</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <volist name="list" id="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td>
                        <notempty name="vo.thumbnail">
                            <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.thumbnail)}');">
                                <i class="fa fa-photo fa-fw"></i>
                            </a>
                            <else/>
                            <i class="fa fa-close fa-fw"></i>
                        </notempty>
                    </td>
                    <td>{$vo.introduction}</td>
                    <td>
                        {:date('Y-m-d H:i:s',$vo['create_time'])}
                    </td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('Test/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Test/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </volist>
        </table>
        <!--分页-->
<!--        <ul class="pagination">{$page|default=''}</ul>-->
    </form>
    
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="text/javascript" src="__STATIC__/js/tablesort/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__STATIC__/js/tablesort/js/dataTables.bootstrap.js"></script>
<script>

    function reloadPage(win) {
        win.location.reload();
    }
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $('#example').dataTable();
        $('#example_wrapper').children('.row').eq(0).remove();
        $('#example_wrapper').children('.row').eq(1).children('.col-sm-5').remove();
        $('table').find('th').eq(1).removeClass('sorting');

        $('table th').click(function(){
            $('table').find('th').eq(1).removeClass('sorting');
        });
    } );
</script>
</body>
</html>